Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: la opción "mensaje" requerida es del tipo: _MESSAGE; esperaba un valor no vacío. (Discord.js)

¿Por qué este código arroja error?

 client.on("interaction", interaction => { if (!interaction.isContextMenu()) return; const msg = interaction.getMessage("message", true); });
 TypeError [COMMAND_INTERACTION_OPTION_EMPTY]: Required option "message" is of type: _MESSAGE; expected a non-empty value.

Estoy usando discord.js v 13 y el servidor djs no pudo ayudarme.

¿Por favor ayuda? gracias

Por cierto, no tengo intenciones porque esto va a ser application.commands only bot, así que tengo intenciones de intenciones: []

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Aunque otras fuentes pueden indicar que no necesita ninguna intención para un bot solo de interacción que solo tiene el alcance application.commands , discord.js requiere el alcance GUILDS o 1 .

Su nuevo constructor de cliente debe ser:

 const client = new Client({ intents: 1, // ... rest of the client constructor });

Además, el evento de interaction está en desuso. En su lugar, use interactionCreate , es exactamente lo mismo, solo que con un nombre diferente.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!